public class Frog extends animal implements Swimming,Running {
    //继承的子类要沿用父类的构造方法
    public Frog(String name,int age){
        super("青蛙",1);
    }
    //重写父类eat方法
    @Override
    public void eat() {
        System.out.println(name + "正在吃");
    }

    //接口的两个方法
    //青蛙会跑
    @Override
    public void run() {
        System.out.println("青蛙在跑！");
    }
    //青蛙会游泳
    @Override
    public void swim() {
        System.out.println("青蛙在游泳！");
    }
}
